package ac.github.os.internal.core.config.type

import ac.github.os.internal.core.config.DataType
import ac.github.os.internal.session.Session
import org.bukkit.Bukkit
import org.bukkit.Location

class DataLocation : DataType<Location> {
    override fun toValue(string: String, session: Session): Location {
        val split = string.split(",")
        return Location(Bukkit.getWorld(split[0]), split[1].toDouble(), split[2].toDouble(), split[3].toDouble())
    }
}